﻿namespace BrainTechLLC.ThreadSafeObjects
{
    using System;

    public static class CacheHelper
    {
    }

    /// <summary>
    /// Used on Properties
    /// This attribute specifies that the property is a Cache-derived object
    /// Used to auto-invalidate all cached properties in a single call
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class IsCached : System.Attribute
    {
        private bool _val;

        public IsCached(bool val)
        {
            _val = val;
        }

        public bool Cached
        {
            get { return _val; }
        }
    }

    [AttributeUsage(AttributeTargets.Method)]
    public class PopulatesProperty : System.Attribute
    {
        private string _val;

        public PopulatesProperty(string val)
        {
            _val = val;
        }

        public string PopulatesPropertyName
        {
            get { return _val; }
        }
    }
}